using System;
using System.Collections;

namespace CheckSFV
{
	public class SFVFile
	{
		private string _fileName;
		private string _newHash;
		private string _oldHash;
		
		public SFVFile (string fileName)
		{
			_fileName = fileName;
		}
		
		public SFVFile (string fileName, string oldHash)
		{
			_fileName = fileName;
			_oldHash = oldHash;
		}
		
		public string FileName 
		{
			get {return _fileName;}	
		}
		
		public string NewHash
		{
			get {return _newHash;}	
			set {_newHash = value;}
		}
		
		public string OldHash
		{
			get {return _oldHash;}	
		}
		
		public bool isOK 
		{
			 get { return NewHash.Equals(OldHash) && !NewHash.Equals (string.Empty) && !OldHash.Equals (string.Empty); }	
		}
		
		public override bool Equals (object obj)
		{
			return FileName.Equals (((SFVFile)obj).FileName);
		}
		
		public override int GetHashCode ()
		{
			 return base.GetHashCode();
		}
	}
	
	public class SFVFiles : ArrayList
	{
		public int Add (SFVFile value)
		{
			
			 return base.Add (value);
		}
		
		public SFVFile Item (int index)
		{
			return (SFVFile)base[index];	
		}
	}
}

